﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using Microsoft.Ccr.Core;
using Microsoft.Dss.Core.Attributes;
using Microsoft.Dss.Core.DsspHttp;
using Microsoft.Dss.ServiceModel.Dssp;
using Microsoft.Dss.ServiceModel.DsspServiceBase;
using W3C.Soap;
using pioneerctrl = PioneerControl.Proxy;

namespace HighLevelControl
{
    /// <summary>
    /// HighLevelControl state
    /// </summary>
    [DataContract]
    public class State
    {
        private pioneerctrl.Replace _pioneerstatereplace;
        private pioneerctrl.Replace _pioneerstatereplace2;

        int PC1count;
        int PC2count;

        #region These 2 variables where used for evaluating the total sent messages
        [DataMember]
        [Description("Variable for counting the iterations received from remote 1")]
        public int PC1iterations
        {
            get { return PC1count; }
            set { PC1count = value; }
        }

        [DataMember]
        [Description("Variable for counting the iterations received from remote 1")]
        public int PC2iterations
        {
            get { return PC2count; }
            set { PC2count = value; }
        }
        #endregion

        ///
        //Because the member was defined in terms of the partner types, we use [DataMemberConstructor] instead
        //of [DataMember] as usually used.
        [DataMemberConstructor]
        [Description("The last known state of the Pioneer 1 in a replace message.")]
        public pioneerctrl.Replace PioneerStateReplace
        {
            get { return _pioneerstatereplace; }
            set { _pioneerstatereplace = value; }
        }

        [DataMemberConstructor]
        [Description("The last known state of the Pioneer 2 in a replace message.")]
        public pioneerctrl.Replace PioneerStateReplace2
        {
            get { return _pioneerstatereplace2; }
            set { _pioneerstatereplace2 = value; }
        }
    }
}
